// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
    canIUseGetUserProfile: false,
    canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
  },
  // 事件处理函数
  toEdit(){
    wx.navigateTo({
      url: '../edit/edit',
    })
  },
  goIntegral:function(){
    wx.navigateTo({
      url: '../integral/integral',
    })
  },
  golog:function(){
    wx.navigateTo({
      url: '../integralMall/integralMall',
    })
  },
  goInvite:function(){
    wx.navigateTo({
      url: '../invite/invite',
    })
  },
  goAddress:function(){
    wx.navigateTo({
      url: '../address/address',
    })
  },
  goOrder:function(){
    wx.navigateTo({
      url: '../order/order',
    })
  },
  goFeedBack:function(){
    wx.navigateTo({
      url: '../feedback/feedback',
    })
  },
  onLoad() {
    if (wx.getUserProfile) {
      this.setData({
        canIUseGetUserProfile: true
      })
    }
  }
})
